<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,
            initial-scale=1.0,user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>页面</title>
    <link rel="stylesheet" href="./static/css/weui.min.css">
    <link rel="stylesheet" href="./static/css/jx.css">
</head>
<body>
<div class="page button js_show">
    <div class="weui-panel">
        <div class="weui-panel__hd">交预交款</div>
        <div class="weui-panel__bd page__bd_spacing">
            <div class="weui-pay">
                <div class="weui-pay-inner">
                    <h1 class="weui-pay-title">付款金额(元)</h1>
                    <div class="weui-pay-input"> <strong class="weui-pay-strong">￥</strong>
                        <input type="number" name="money" class="weui-pay-inputs" placeholder="请输入金额"></div>
                    <div class="weui-pay-intro">最多可输入金额50000元</div>
                </div>
                <p class="weui-pay-info">存预交款到账户中</p>
                <div class="weui-pay-btn">
                    <a href="javascript:success();" class="weui-btn weui-btn_primary">立即支付</a>
                </div>
            </div>
        </div>
        <div class="weui-pannel_ft page__bd_spacing">
        </div>
    </div>
</div>

<div id="pay-error-toast" style="opacity: 0; display: none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <i class="weui-icon-warn weui-icon_toast"></i>
        <p class="weui-toast__content">支付失败</p>
    </div>
</div>
</body>

<div class="weui-icon-success-no-circle"></div>
<script type="text/javascript" src="./static/js/weui.min.js"></script>
<script type="text/javascript" src="./static/js/zepto.min.js"></script>
<script type="text/javascript">
//    weui.toast("支付成功");
var $errorToast = $('#pay-error-toast');
var errorToast = function() {
    if ($errorToast.css('display') != 'none') return;
    $errorToast.fadeIn(100);
    setTimeout(function () {
        $errorToast.fadeOut(100);
    }, 2000);
}
errorToast();
var success = function(){
    weui.toast('支付成功', {
        duration: 1000,
        callback: function(){
            window.location.href = './selfPayDetail.html';
        }
    });
}
//    weui.toast("支付失败1", {
//        duration: 300000,
//        className: 'weui-icon-warn',
//        callback: function(){ console.log('close') }
//    });
</script>
</html>
